package com.perceptivesoftware.licensing.domain.generated;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TwUserprivId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TwUserprivId implements java.io.Serializable
{

	// Fields    

	private String userprivUserCode;

	private Long userprivPrivType;

	private Long userprivPrivAction;

	private String userprivItemCode;

	// Constructors

	/** default constructor */
	public TwUserprivId()
	{
		// empty constructor required for Spring
	}

	// Property accessors

	@Column(name = "USERPRIV_USER_CODE", nullable = false, length = 38)
	public String getUserprivUserCode()
	{
		return this.userprivUserCode;
	}

	public void setUserprivUserCode(String userprivUserCode)
	{
		this.userprivUserCode = userprivUserCode;
	}

	@Column(name = "USERPRIV_PRIV_TYPE", nullable = false, scale = 0)
	public Long getUserprivPrivType()
	{
		return this.userprivPrivType;
	}

	public void setUserprivPrivType(Long userprivPrivType)
	{
		this.userprivPrivType = userprivPrivType;
	}

	@Column(name = "USERPRIV_PRIV_ACTION", nullable = false, scale = 0)
	public Long getUserprivPrivAction()
	{
		return this.userprivPrivAction;
	}

	public void setUserprivPrivAction(Long userprivPrivAction)
	{
		this.userprivPrivAction = userprivPrivAction;
	}

	@Column(name = "USERPRIV_ITEM_CODE", nullable = false, length = 38)
	public String getUserprivItemCode()
	{
		return this.userprivItemCode;
	}

	public void setUserprivItemCode(String userprivItemCode)
	{
		this.userprivItemCode = userprivItemCode;
	}

	public boolean equals(Object other)
	{
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TwUserprivId))
			return false;
		TwUserprivId castOther = (TwUserprivId) other;

		return ((this.getUserprivUserCode() == castOther.getUserprivUserCode()) || (this.getUserprivUserCode() != null && castOther.getUserprivUserCode() != null && this.getUserprivUserCode().equals(
				castOther.getUserprivUserCode()))) && ((this.getUserprivPrivType() == castOther.getUserprivPrivType()) || (this.getUserprivPrivType() != null && castOther.getUserprivPrivType() != null && this.getUserprivPrivType().equals(
				castOther.getUserprivPrivType()))) && ((this.getUserprivPrivAction() == castOther.getUserprivPrivAction()) || (this.getUserprivPrivAction() != null && castOther.getUserprivPrivAction() != null && this.getUserprivPrivAction().equals(
				castOther.getUserprivPrivAction()))) && ((this.getUserprivItemCode() == castOther.getUserprivItemCode()) || (this.getUserprivItemCode() != null && castOther.getUserprivItemCode() != null && this.getUserprivItemCode().equals(
				castOther.getUserprivItemCode())));
	}

	public int hashCode()
	{
		int result = 17;

		result = 37 * result + (getUserprivUserCode() == null ? 0 : this.getUserprivUserCode().hashCode());
		result = 37 * result + (getUserprivPrivType() == null ? 0 : this.getUserprivPrivType().hashCode());
		result = 37 * result + (getUserprivPrivAction() == null ? 0 : this.getUserprivPrivAction().hashCode());
		result = 37 * result + (getUserprivItemCode() == null ? 0 : this.getUserprivItemCode().hashCode());
		return result;
	}

}